package com.firefly.service.repository.shop;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.firefly.dao.dao.shop.po.AreaPo;
import com.firefly.dao.dao.shop.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @description:
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2023/2/1
 **/
@Repository
public class AreaRepository {
    private final AreaService areaService;
    @Autowired
    public AreaRepository(AreaService areaService){
        this.areaService = areaService;
    }
    public Boolean updateDisplay(AreaPo request){
        UpdateWrapper<AreaPo> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("id",request.getId()).set("display",request.getDisplay());
        return areaService.update(updateWrapper);
    }
}
